import java.sql.Date;

public class MyFolder {
    //文件夹名称
    private String name;
    //创建时间
    private Date createtiem;
    //包含的文件
    private MyFile[] files;
    //包含的子文件夹
    private MyFolder[] subFolders;
    public int totalSize(){
        int totalSzie = 0;
        if(files != null){
            for(MyFile file : files){
                totalSzie += file.getSize();
            }
        }
        if(subFolders != null){
            for(MyFolder folder : subFolders){
                totalSize += folder.totalSize();
            }
        }
        return totalSize();
    }
    //其他方法......
}
